home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
prog
/
tpex.arj
/
C8REVEX4.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-09-04
|
2KB
|
62 lines
{
Programming in Turbo Pascal 6.0.
Turbo Pascal By example By Greg Perry.
Chapter 8 Review Exercise #4.
Robert E. Wade 9-4-93
}
PROGRAM PayCheck;
USES Crt, Printer;
CONST Spc = ' ';
EmpName = 'Robert Wade';
PayDate = '01/09/92';
HoursWorked = 40;
Rate = 40.50;
TaxRate = 0.40;
GrossPay = HoursWorked * Rate;
Taxes = TaxRate * GrossPay;
NetPay = GrossPay - Taxes;
BEGIN
CLRSCR;
{ Send output to screen. (* This was not part of the exercise
however, I am sending it to screen because I do not have a
printer *) Output to printer is after screen output }
WRITELN( '*****************************************************************' );
WRITELN( '*', Spc:63, '*' );
WRITELN( '*', Spc:40, 'Date: ', Paydate, Spc:9, '*' );
WRITELN( '*', Spc:63, '*' );
WRITELN( '* Pay to the Order of: ', EmpName, Spc:30, '*' );
WRITELN( '*', Spc:63, '*' );
WRITELN( '* Pay the full amount of: $', GrossPay:10:2, Spc:27, '*' );
WRITELN( '*', Spc:26, '----------', Spc:27, '*' );
WRITELN( '*', Spc:63, '*' );
WRITELN( '*', Spc:39, '----------------------- *' );
WRITELN( '*', Spc:39, 'Dan Chambers, Treasurer *' );
WRITELN( '*', Spc:63, '*' );
WRITELN( '*****************************************************************' );
{ Send output to printer. Uncomment the following code
to send output to the printer. }
{
WRITELN(LST, '*****************************************************************' );
WRITELN(LST, '*', Spc:63, '*' );
WRITELN(LST, '*', Spc:40, 'Date: ', Paydate, Spc:9, '*' );
WRITELN(LST, '*', Spc:63, '*' );
WRITELN(LST, '* Pay to the Order of: ', EmpName, Spc:30, '*' );
WRITELN(LST, '*', Spc:63, '*' );
WRITELN(LST, '* Pay the full amount of: $', GrossPay:10:2, Spc:27, '*' );
WRITELN(LST, '*', Spc:26, '----------', Spc:27, '*' );
WRITELN(LST, '*', Spc:63, '*' );
WRITELN(LST, '*', Spc:39, '----------------------- *' );
WRITELN(LST, '*', Spc:39, 'Dan Chambers, Treasurer *' );
WRITELN(LST, '*', Spc:63, '*' );
WRITELN(LST, '*****************************************************************' );
}
END.